// Formal Verification Project
// Top Level Wrapper


module wrapper();

reg clk, rst, start;
reg [0:1] short_key; // parametrized key
reg [0:1] short_plaintext; // parametrized input

wire [0:127] np_output, pipe_output;
wire done;

wire [0:127] key;
wire [0:127] plaintext;

assign key = {125'b0, short_key};
assign plaintext = {125'b0, short_plaintext};

// initialize both modules

np_aes npAES ( 	.clk(clk),
				.rst(rst),
				.key(key),
				.start(start),
				.data_in(plaintext),
				.done(done),
				.data_out(np_output));
				

aespipe pipeAES(.clk(clk),
				.rst(rst),
				.data_in(plaintext),
				.key(key),
				.aesdata(pipe_output));
				
// generate the clk
initial
	begin
		#1 clk = 0;
		forever begin
			#1 clk = !clk;
			end
	end

// generate log files	
initial
	begin
		$dumpfile ("wrapper.dump");
		$dumpvars (0, wrapper);
	end

// generate test values

initial
	begin
		short_key = 2'b00;
		short_plaintext = 2'b00;
		start = 0;
		rst = 1; // reset the system

		#3 rst = 0;
		#2 
			short_key = 2'b01;
			//key_in = 128'h2b7e151628aed2a6abf7158809cf4f3c;
		#1
			short_plaintext = 2'b01;
			//data = {32'h3243f6a8, 32'h885a308d, 32'h313198a2, 32'he0370734};
			start = 1;
		#2
	  		start = 0;
		#100

		$finish;
	end

				



endmodule